//
//  DAAlertView.h
//  DAAlertViewFour
//
//  Created by DreamArts on 16/4/8.
//  Copyright © 2016年 lidongyang. All rights reserved.
//

#import <UIKit/UIKit.h>

@class DAAlertView;

typedef enum {
    DAAlertDisplayerPositionTypeCenter = 0, //类似AlertView(默认)
    DAAlertDisplayerPositionTypeBottom = 1, //类似ActionSheet
} DAAlertDisplayerPositionType;

typedef enum {
    DAAertDisplayerContentTypeDefault = 0, // 默认样式
} DAAlertDisplayerContentType;

typedef enum {
    DAAlertDisplayerShowTypeBounce  = 0, //弹簧效果(默认)
    DAAlertDisplayerShowTypeDrawer  = 1, //划出效果
} DAAlertDisplayerShowType;

typedef void (^ displayerActionBlock)(DAAlertView *displayer , NSInteger index);

@interface DAAlertView : UIView
//主视图的位置
@property (nonatomic) DAAlertDisplayerPositionType alertDisplayerPositionType;
//内容视图
@property (nonatomic) DAAlertDisplayerContentType alertDisplayerContentType;
//主视图出现的动画效果
@property (nonatomic) DAAlertDisplayerShowType alertDisplayerShowType;
//主视图
@property (nonatomic,strong) UIView *alertView;
//标题控件
@property (nonatomic,strong) UILabel *titleLabel;
//内容控件
@property (nonatomic,strong) UILabel *contentLabel;
//取消按钮
@property (nonatomic,strong) UIButton *cancelButton;
//是否隐藏'取消按钮'
@property (nonatomic) BOOL isHiddenCancelButton;
//其他按钮列表,可传入'UIButton', 当传入NSString时,按钮为默认样式
@property (nonatomic,strong) NSArray *otherButtonList;
//其他按钮的字体颜色,默认为红色
@property (nonatomic,strong) UIColor *otherButtonTitleColor;
//是否开启触摸背景层以取消视图,默认为否
@property (nonatomic) BOOL isHiddenDisplayerByTouch;
//按钮点击的回调,取消按钮的index为999
@property (nonatomic,copy) displayerActionBlock displayerActionBlock;
//主视图宽度
@property (nonatomic) CGFloat alertViewWidth;
//标题控件与主视图的内边距,默认为(10, 10, 5, 10)
@property (nonatomic) UIEdgeInsets titleEdgeInsets;
//内容视图与主视图的内边距,默认为(0, 10, 0, 10)
@property (nonatomic) UIEdgeInsets contentEdgeInsets;
//按钮之间的间距,默认为0.5
@property (nonatomic) CGFloat buttonsInset;
//按钮的高度 默认为45
@property (nonatomic) CGFloat buttonHeight;


/*!
 @override method showDAAlertWithPositionType:animationType:titleText:contenText:cancelButtonTitle
                  :buttons block;
 @abstract  给alert快速设置方法
 @discussion 给alert快速设置基本显示内容以及点击事件
 @param text 需要赋值的文本内容
 @param fit 是否使用自适应高度模式，YES为是
 @result void */

///类方法 创建alert
+ (void)showDAAlertWithPositionType:(DAAlertDisplayerPositionType)positionType animationType:(DAAlertDisplayerShowType)animationType titleText:(NSString *)title contentText:(NSString *)content cancelButtonTitle:(NSString *)cancelButtonTitle buttonList:(NSArray *)buttons handleActionBlock:(displayerActionBlock)block;

- (void)displayerHidden;


+ (void)delayDisplayer;


@end
